package testSpring;

import com.service.UserService;
import com.entity.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test3 {

    @Test
    public void testAop(){
        ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService service=(UserService)ctx.getBean("service");
        User user=new User();
        user.setId(1);
        user.setUserName("test");
        user.setPassWord("123456");
        user.setEmail("test@xxx.com");

        service.addNewUser(user);
    }
}
